<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    
    <title>Array manipulation routines &mdash; NumPy v1.18 Manual</title>
    
    <link rel="stylesheet" type="text/css" href="../_static/css/spc-bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../_static/css/spc-extend.css">
    <link rel="stylesheet" href="../_static/scipy.css" type="text/css" >
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" >
    <link rel="stylesheet" href="../_static/graphviz.css" type="text/css" >
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.18.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script type="text/javascript" src="../_static/js/copybutton.js"></script>
    <link rel="author" title="About these documents" href="../about.html" >
    <link rel="index" title="Index" href="../genindex.html" >
    <link rel="search" title="Search" href="../search.html" >
    <link rel="top" title="NumPy v1.18 Manual" href="../index.html" >
    <link rel="up" title="Routines" href="routines.html" >
    <link rel="next" title="numpy.copyto" href="generated/numpy.copyto.html" >
    <link rel="prev" title="numpy.mat" href="generated/numpy.mat.html" > 
  </head>
  <body>
<div class="container">
  <div class="top-scipy-org-logo-header" style="background-color: #a2bae8;">
    <a href="../index.html">
      <img border=0 alt="NumPy" src="../_static/numpy_logo.png"></a>
    </div>
  </div>
</div>


    <div class="container">
      <div class="main">
        
	<div class="row-fluid">
	  <div class="span12">
	    <div class="spc-navbar">
              
    <ul class="nav nav-pills pull-left">
        <li class="active"><a href="https://numpy.org/">NumPy.org</a></li>
        <li class="active"><a href="https://numpy.org/doc">Docs</a></li>
        
        <li class="active"><a href="../index.html">NumPy v1.18 Manual</a></li>
        

          <li class="active"><a href="index.html" >NumPy Reference</a></li>
          <li class="active"><a href="routines.html" accesskey="U">Routines</a></li> 
    </ul>
              
              
    <ul class="nav nav-pills pull-right">
      <li class="active">
        <a href="../genindex.html" title="General Index"
           accesskey="I">index</a>
      </li>
      <li class="active">
        <a href="generated/numpy.copyto.html" title="numpy.copyto"
           accesskey="N">next</a>
      </li>
      <li class="active">
        <a href="generated/numpy.mat.html" title="numpy.mat"
           accesskey="P">previous</a>
      </li>
    </ul>
              
	    </div>
	  </div>
	</div>
        

	<div class="row-fluid">
      <div class="spc-rightsidebar span3">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Array manipulation routines</a><ul>
<li><a class="reference internal" href="#basic-operations">Basic operations</a></li>
<li><a class="reference internal" href="#changing-array-shape">Changing array shape</a></li>
<li><a class="reference internal" href="#transpose-like-operations">Transpose-like operations</a></li>
<li><a class="reference internal" href="#changing-number-of-dimensions">Changing number of dimensions</a></li>
<li><a class="reference internal" href="#changing-kind-of-array">Changing kind of array</a></li>
<li><a class="reference internal" href="#joining-arrays">Joining arrays</a></li>
<li><a class="reference internal" href="#splitting-arrays">Splitting arrays</a></li>
<li><a class="reference internal" href="#tiling-arrays">Tiling arrays</a></li>
<li><a class="reference internal" href="#adding-and-removing-elements">Adding and removing elements</a></li>
<li><a class="reference internal" href="#rearranging-elements">Rearranging elements</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="generated/numpy.mat.html"
                        title="previous chapter">numpy.mat</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="generated/numpy.copyto.html"
                        title="next chapter">numpy.copyto</a></p>
<div id="searchbox" style="display: none" role="search">
  <h4>Quick search</h4>
    <div>
    <form class="search" action="../search.html" method="get">
      <input type="text" style="width: inherit;" name="q" />
      <input type="submit" value="search" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
          <div class="span9">
            
        <div class="bodywrapper">
          <div class="body" id="spc-section-body">
            
  <div class="section" id="array-manipulation-routines">
<h1>Array manipulation routines<a class="headerlink" href="#array-manipulation-routines" title="Permalink to this headline">¶</a></h1>
<div class="section" id="basic-operations">
<h2>Basic operations<a class="headerlink" href="#basic-operations" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.copyto.html#numpy.copyto" title="numpy.copyto"><code class="xref py py-obj docutils literal notranslate"><span class="pre">copyto</span></code></a>(dst, src[, casting, where])</p></td>
<td><p>Copies values from one array to another, broadcasting as necessary.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.shape.html#numpy.shape" title="numpy.shape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">shape</span></code></a>(a)</p></td>
<td><p>Return the shape of an array.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="changing-array-shape">
<h2>Changing array shape<a class="headerlink" href="#changing-array-shape" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.reshape.html#numpy.reshape" title="numpy.reshape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">reshape</span></code></a>(a, newshape[, order])</p></td>
<td><p>Gives a new shape to an array without changing its data.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ravel.html#numpy.ravel" title="numpy.ravel"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ravel</span></code></a>(a[, order])</p></td>
<td><p>Return a contiguous flattened array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.ndarray.flat.html#numpy.ndarray.flat" title="numpy.ndarray.flat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ndarray.flat</span></code></a></p></td>
<td><p>A 1-D iterator over the array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ndarray.flatten.html#numpy.ndarray.flatten" title="numpy.ndarray.flatten"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ndarray.flatten</span></code></a>([order])</p></td>
<td><p>Return a copy of the array collapsed into one dimension.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="transpose-like-operations">
<h2>Transpose-like operations<a class="headerlink" href="#transpose-like-operations" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.moveaxis.html#numpy.moveaxis" title="numpy.moveaxis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">moveaxis</span></code></a>(a, source, destination)</p></td>
<td><p>Move axes of an array to new positions.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.rollaxis.html#numpy.rollaxis" title="numpy.rollaxis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rollaxis</span></code></a>(a, axis[, start])</p></td>
<td><p>Roll the specified axis backwards, until it lies in a given position.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.swapaxes.html#numpy.swapaxes" title="numpy.swapaxes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">swapaxes</span></code></a>(a, axis1, axis2)</p></td>
<td><p>Interchange two axes of an array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ndarray.T.html#numpy.ndarray.T" title="numpy.ndarray.T"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ndarray.T</span></code></a></p></td>
<td><p>The transposed array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.transpose.html#numpy.transpose" title="numpy.transpose"><code class="xref py py-obj docutils literal notranslate"><span class="pre">transpose</span></code></a>(a[, axes])</p></td>
<td><p>Permute the dimensions of an array.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="changing-number-of-dimensions">
<h2>Changing number of dimensions<a class="headerlink" href="#changing-number-of-dimensions" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.atleast_1d.html#numpy.atleast_1d" title="numpy.atleast_1d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">atleast_1d</span></code></a>(\*arys)</p></td>
<td><p>Convert inputs to arrays with at least one dimension.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.atleast_2d.html#numpy.atleast_2d" title="numpy.atleast_2d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">atleast_2d</span></code></a>(\*arys)</p></td>
<td><p>View inputs as arrays with at least two dimensions.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.atleast_3d.html#numpy.atleast_3d" title="numpy.atleast_3d"><code class="xref py py-obj docutils literal notranslate"><span class="pre">atleast_3d</span></code></a>(\*arys)</p></td>
<td><p>View inputs as arrays with at least three dimensions.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.broadcast.html#numpy.broadcast" title="numpy.broadcast"><code class="xref py py-obj docutils literal notranslate"><span class="pre">broadcast</span></code></a></p></td>
<td><p>Produce an object that mimics broadcasting.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.broadcast_to.html#numpy.broadcast_to" title="numpy.broadcast_to"><code class="xref py py-obj docutils literal notranslate"><span class="pre">broadcast_to</span></code></a>(array, shape[, subok])</p></td>
<td><p>Broadcast an array to a new shape.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.broadcast_arrays.html#numpy.broadcast_arrays" title="numpy.broadcast_arrays"><code class="xref py py-obj docutils literal notranslate"><span class="pre">broadcast_arrays</span></code></a>(\*args, \*\*kwargs)</p></td>
<td><p>Broadcast any number of arrays against each other.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.expand_dims.html#numpy.expand_dims" title="numpy.expand_dims"><code class="xref py py-obj docutils literal notranslate"><span class="pre">expand_dims</span></code></a>(a, axis)</p></td>
<td><p>Expand the shape of an array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.squeeze.html#numpy.squeeze" title="numpy.squeeze"><code class="xref py py-obj docutils literal notranslate"><span class="pre">squeeze</span></code></a>(a[, axis])</p></td>
<td><p>Remove single-dimensional entries from the shape of an array.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="changing-kind-of-array">
<h2>Changing kind of array<a class="headerlink" href="#changing-kind-of-array" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.asarray.html#numpy.asarray" title="numpy.asarray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asarray</span></code></a>(a[, dtype, order])</p></td>
<td><p>Convert the input to an array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.asanyarray.html#numpy.asanyarray" title="numpy.asanyarray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asanyarray</span></code></a>(a[, dtype, order])</p></td>
<td><p>Convert the input to an ndarray, but pass ndarray subclasses through.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.asmatrix.html#numpy.asmatrix" title="numpy.asmatrix"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asmatrix</span></code></a>(data[, dtype])</p></td>
<td><p>Interpret the input as a matrix.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.asfarray.html#numpy.asfarray" title="numpy.asfarray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asfarray</span></code></a>(a[, dtype])</p></td>
<td><p>Return an array converted to a float type.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.asfortranarray.html#numpy.asfortranarray" title="numpy.asfortranarray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asfortranarray</span></code></a>(a[, dtype])</p></td>
<td><p>Return an array (ndim &gt;= 1) laid out in Fortran order in memory.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.ascontiguousarray.html#numpy.ascontiguousarray" title="numpy.ascontiguousarray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ascontiguousarray</span></code></a>(a[, dtype])</p></td>
<td><p>Return a contiguous array (ndim &gt;= 1) in memory (C order).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.asarray_chkfinite.html#numpy.asarray_chkfinite" title="numpy.asarray_chkfinite"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asarray_chkfinite</span></code></a>(a[, dtype, order])</p></td>
<td><p>Convert the input to an array, checking for NaNs or Infs.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.asscalar.html#numpy.asscalar" title="numpy.asscalar"><code class="xref py py-obj docutils literal notranslate"><span class="pre">asscalar</span></code></a>(a)</p></td>
<td><p>Convert an array of size 1 to its scalar equivalent.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.require.html#numpy.require" title="numpy.require"><code class="xref py py-obj docutils literal notranslate"><span class="pre">require</span></code></a>(a[, dtype, requirements])</p></td>
<td><p>Return an ndarray of the provided type that satisfies requirements.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="joining-arrays">
<h2>Joining arrays<a class="headerlink" href="#joining-arrays" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.concatenate.html#numpy.concatenate" title="numpy.concatenate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">concatenate</span></code></a>([axis, out])</p></td>
<td><p>Join a sequence of arrays along an existing axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.stack.html#numpy.stack" title="numpy.stack"><code class="xref py py-obj docutils literal notranslate"><span class="pre">stack</span></code></a>(arrays[, axis, out])</p></td>
<td><p>Join a sequence of arrays along a new axis.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.column_stack.html#numpy.column_stack" title="numpy.column_stack"><code class="xref py py-obj docutils literal notranslate"><span class="pre">column_stack</span></code></a>(tup)</p></td>
<td><p>Stack 1-D arrays as columns into a 2-D array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.dstack.html#numpy.dstack" title="numpy.dstack"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dstack</span></code></a>(tup)</p></td>
<td><p>Stack arrays in sequence depth wise (along third axis).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.hstack.html#numpy.hstack" title="numpy.hstack"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hstack</span></code></a>(tup)</p></td>
<td><p>Stack arrays in sequence horizontally (column wise).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.vstack.html#numpy.vstack" title="numpy.vstack"><code class="xref py py-obj docutils literal notranslate"><span class="pre">vstack</span></code></a>(tup)</p></td>
<td><p>Stack arrays in sequence vertically (row wise).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.block.html#numpy.block" title="numpy.block"><code class="xref py py-obj docutils literal notranslate"><span class="pre">block</span></code></a>(arrays)</p></td>
<td><p>Assemble an nd-array from nested lists of blocks.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="splitting-arrays">
<h2>Splitting arrays<a class="headerlink" href="#splitting-arrays" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.split.html#numpy.split" title="numpy.split"><code class="xref py py-obj docutils literal notranslate"><span class="pre">split</span></code></a>(ary, indices_or_sections[, axis])</p></td>
<td><p>Split an array into multiple sub-arrays as views into <em class="xref py py-obj">ary</em>.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.array_split.html#numpy.array_split" title="numpy.array_split"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array_split</span></code></a>(ary, indices_or_sections[, axis])</p></td>
<td><p>Split an array into multiple sub-arrays.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.dsplit.html#numpy.dsplit" title="numpy.dsplit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dsplit</span></code></a>(ary, indices_or_sections)</p></td>
<td><p>Split array into multiple sub-arrays along the 3rd axis (depth).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.hsplit.html#numpy.hsplit" title="numpy.hsplit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hsplit</span></code></a>(ary, indices_or_sections)</p></td>
<td><p>Split an array into multiple sub-arrays horizontally (column-wise).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.vsplit.html#numpy.vsplit" title="numpy.vsplit"><code class="xref py py-obj docutils literal notranslate"><span class="pre">vsplit</span></code></a>(ary, indices_or_sections)</p></td>
<td><p>Split an array into multiple sub-arrays vertically (row-wise).</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="tiling-arrays">
<h2>Tiling arrays<a class="headerlink" href="#tiling-arrays" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.tile.html#numpy.tile" title="numpy.tile"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tile</span></code></a>(A, reps)</p></td>
<td><p>Construct an array by repeating A the number of times given by reps.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.repeat.html#numpy.repeat" title="numpy.repeat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">repeat</span></code></a>(a, repeats[, axis])</p></td>
<td><p>Repeat elements of an array.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="adding-and-removing-elements">
<h2>Adding and removing elements<a class="headerlink" href="#adding-and-removing-elements" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.delete.html#numpy.delete" title="numpy.delete"><code class="xref py py-obj docutils literal notranslate"><span class="pre">delete</span></code></a>(arr, obj[, axis])</p></td>
<td><p>Return a new array with sub-arrays along an axis deleted.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.insert.html#numpy.insert" title="numpy.insert"><code class="xref py py-obj docutils literal notranslate"><span class="pre">insert</span></code></a>(arr, obj, values[, axis])</p></td>
<td><p>Insert values along the given axis before the given indices.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.append.html#numpy.append" title="numpy.append"><code class="xref py py-obj docutils literal notranslate"><span class="pre">append</span></code></a>(arr, values[, axis])</p></td>
<td><p>Append values to the end of an array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.resize.html#numpy.resize" title="numpy.resize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">resize</span></code></a>(a, new_shape)</p></td>
<td><p>Return a new array with the specified shape.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.trim_zeros.html#numpy.trim_zeros" title="numpy.trim_zeros"><code class="xref py py-obj docutils literal notranslate"><span class="pre">trim_zeros</span></code></a>(filt[, trim])</p></td>
<td><p>Trim the leading and/or trailing zeros from a 1-D array or sequence.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.unique.html#numpy.unique" title="numpy.unique"><code class="xref py py-obj docutils literal notranslate"><span class="pre">unique</span></code></a>(ar[, return_index, return_inverse, …])</p></td>
<td><p>Find the unique elements of an array.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="rearranging-elements">
<h2>Rearranging elements<a class="headerlink" href="#rearranging-elements" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.flip.html#numpy.flip" title="numpy.flip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flip</span></code></a>(m[, axis])</p></td>
<td><p>Reverse the order of elements in an array along the given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.fliplr.html#numpy.fliplr" title="numpy.fliplr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fliplr</span></code></a>(m)</p></td>
<td><p>Flip array in the left/right direction.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.flipud.html#numpy.flipud" title="numpy.flipud"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flipud</span></code></a>(m)</p></td>
<td><p>Flip array in the up/down direction.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.reshape.html#numpy.reshape" title="numpy.reshape"><code class="xref py py-obj docutils literal notranslate"><span class="pre">reshape</span></code></a>(a, newshape[, order])</p></td>
<td><p>Gives a new shape to an array without changing its data.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/numpy.roll.html#numpy.roll" title="numpy.roll"><code class="xref py py-obj docutils literal notranslate"><span class="pre">roll</span></code></a>(a, shift[, axis])</p></td>
<td><p>Roll array elements along a given axis.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/numpy.rot90.html#numpy.rot90" title="numpy.rot90"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rot90</span></code></a>(m[, k, axes])</p></td>
<td><p>Rotate an array by 90 degrees in the plane specified by axes.</p></td>
</tr>
</tbody>
</table>
</div>
</div>


          </div>
        </div>
          </div>
        </div>
      </div>
    </div>

    <div class="container container-navbar-bottom">
      <div class="spc-navbar">
        
      </div>
    </div>
    <div class="container">
    <div class="footer">
    <div class="row-fluid">
    <ul class="inline pull-left">
      <li>
        &copy; Copyright 2008-2019, The SciPy community.
      </li>
      <li>
      Last updated on Feb 20, 2020.
      </li>
      <li>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.4.2.
      </li>
    </ul>
    </div>
    </div>
    </div>
  </body>
</html>